# coding: utf-8
import os
import sys
from os.path import abspath, dirname
from flask import Flask, request, flash, url_for, redirect, render_template
from flask_sqlalchemy import SQLAlchemy
from apscheduler.schedulers.background import BackgroundScheduler

base_path = abspath(dirname(__file__))
sys.path.insert(0, base_path)

MYSQL_USER = 'root'
MYSQL_PASS = '123456'
MYSQL_HOST = '192.168.31.115'
MYSQL_PORT = 3306
MYSQL_DB = 'bookdb'
MYSQL_CHARSET = 'utf8'

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = f"mysql://{MYSQL_USER}:{MYSQL_PASS}@{MYSQL_HOST}/{MYSQL_DB}?charset={MYSQL_CHARSET}"
app.config['SECRET_KEY'] = b'\x13\xf4\xce\xf8\x96\x07\x17\xf6\x1f\xba\xe0.}{\xe9I\xc0%S\xacvD\x9dN'

